package source;



import org.apache.flink.streaming.api.datastream.DataStream;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * @Description: TODO QQ1667847363
 * @author: xiao kun tai
 * @date:2021/11/2 16:35
 */
public class Source2_File {
    public static void main(String[] args) throws Exception{
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        String inputPath ="src/main/resources/sensor.txt";

        DataStream<String> dataStream = env.readTextFile(inputPath);


        dataStream.print("file").setParallelism(1);

        env.execute("file");

    }
}
